package com.tutou.ikgroup.pojo.dto;

import com.tutou.ikgroup.pojo.po.Chatroom;
import com.tutou.ikuser.pojo.dto.UserDTO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class FriendDTO {
    private String senderName;
    private String senderId;
    private String receiverId;
    private String receiverPhone;
    private String receiverName;
    private String message;
    private Short status;
    private String avatarUrl;

    public static ChatDTO toChatDto(FriendDTO friendDTO) {
        ChatDTO chatDTO = new ChatDTO();
        chatDTO.setChatroom(new Chatroom().setChatroomId("-2"));
        chatDTO.setMessage(friendDTO.getMessage());
        chatDTO.setReceiverId(friendDTO.getReceiverId());
        chatDTO.setSenderId(friendDTO.getSenderId());
        return chatDTO;
    }
}
